<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='edit'">
	<div class="fui-header">
			<div class="fui-header-left" ng-click="goback()">
				<a class="back"></a>
			</div>
			<div class="title">编辑公众号</div>
			<div class="fui-header-right"></div>
	</div>
	<div class="fui-content">
	<div class="weui_cells weui_cells_form">
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">公众号名称</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.title" placeholder="请输入公众号名称">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">公众号appid</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.appid" placeholder="请输入公众号appid">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">公众号密钥</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.appsecret" placeholder="请输入公众号密钥">
					</div>
				</div>
				<div class="weui_cell">
					<div class="weui_cell_hd"><label class="weui_label">公众号分类</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<select ng-model="pagedata.item.group_id">
								<option value="" selected="selected">一级分类</option>
								<option ng-repeat="(value,data) in pagedata.groups" value="{{data.id}}" ng-selected="pagedata.item.group_id==data.id">{{data.title}}</option>
						</select>
					</div>
					<div class="weui_cell_bd weui_cell_primary">
								<select ng-model="pagedata.item.cid">
								<option value="" selected="selected">二级分类</option>
								<option ng-repeat="(value,data) in pagedata.groups[pagedata.item.group_id].cids" value="{{data.id}}" ng-selected="pagedata.item.cid==data.id">{{data.title}}</option>
								</select>			
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">公众号图片</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<ul class="weui_uploader_files" ng-if="pagedata.item.image">
							<li class="weui_uploader_file" style="background-image:url({{tomedia(pagedata.item.image)}})">
							</li>
						</ul>
						<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="image(pagedata.post,'image',true)">
						</div>
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">奖励金币/次</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.jinbi" placeholder="请输入奖励金币">
					</div>
				</div>
				<div class="weui_cell weui_vcode">
					<div class="weui_cell_hd"><label class="weui_label">奖励佣金/次</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<input class="weui_input" type="text" ng-model="pagedata.item.price" placeholder="请输入奖励佣金">
					</div>
				</div>
	</div>
	<div class="weui_cells_title">公众号介绍</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <textarea class="weui_textarea" ng-model="pagedata.item.desc" placeholder="请用一句话来，描述您的公众号介绍！" rows="3"></textarea>
                    <div class="weui_textarea_counter">建议68个字以内！</div>
                </div>
            </div>
    </div>
	<div class="weui_cells">
	<div class="weui_cell weui_cell_switch">
                <div class="weui_cell_hd weui_cell_primary">是否下架？</div>
                <div class="weui_cell_ft">
                    <input class="weui_switch" type="checkbox" ng-checked="pagedata.item.noshow==1" ng-click="toogle(pagedata.item,'noshow',[0,1])">
                </div>
    </div>
	</div>
	<div class="weui_btn_area">
		<a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.item,'/up/post/')">提交</a>
	</div>
	<div ng-include="sys_html('_copyright')"></div>
</div>
</div>
<script>
scope.pagedata.scancode=function () {
			wx.scanQRCode({
				needResult: 1, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
				scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
				success: function (res) {
					var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
					result=result.replace('EAN_13,', '');
					scope.pagedata.item.productsn = result;
					scope.$evalAsync();
				}
			});
}
</script>